<?php
/* * @version $Id: tpl_checkout_confirmation_default.php 6247 2007-04-21 21:34:47Z wilt $
 */
?>
<div id="main_center">
  <ul id="shipsteps">
	<?php if($_SESSION['payment'] == 'paypalwpp'){ ?>
    <li class="s1"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART,'','SSL') ?>"><span></span><?php echo TEXT_SHOPPINT_STEP1; ?></a></li>
    <li class="s2"><span></span><?php echo TEXT_SHOPPINT_EC_STEP2; ?></li>
    <li class="current3"><span></span><?php echo TEXT_SHOPPINT_EC_STEP3; ?></li>
    <li class="s4 ppno"><span></span><?php echo TEXT_SHOPPINT_EC_STEP4; ?></li>
    
	<?php }else{ ?>

    <li class="s1"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART,'','SSL') ?>"><span></span><?php echo TEXT_SHOPPINT_STEP1; ?></a></li>
    <li class="s2"><span></span><?php echo TEXT_SHOPPINT_WPS_STEP2; ?></li>
    <li class="s3"><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING,'','SSL') ?>"><span></span><?php echo TEXT_SHOPPINT_WPS_STEP3; ?></a></li>
    <li class="current4"><span></span><?php echo TEXT_SHOPPINT_WPS_STEP4; ?></li>
    <li class="s5"><span></span><?php echo TEXT_SHOPPINT_WPS_STEP5; ?></li>
	<?php } ?>
  </ul>

<?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
<?php if ($messageStack->size('checkout_confirmation') > 0) echo $messageStack->output('checkout_confirmation'); ?>
<?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>

<div class="margin_t allborder">
<div class="check_box_tit black pad_1em"><?php echo HEADING_TITLE; ?></div>
<div class="pad_10px">
  <!--<h4 id="" class="dark_bg margin_t bg_car"><?php echo HEADING_BILLING_ADDRESS; ?></h4>
  <div class="pad_10px">
  <?php if (!$flagDisablePaymentAddressChange) { ?>
  <ul class="fr"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></ul>
  <?php } ?>
  <?php echo zen_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'); ?></div>-->
  
<?php
  $class =& $_SESSION['payment'];
?>

<h4 class="dark_bg mag_10_px bg_cart red"><?php //echo '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '" class="fr">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?><?php echo HEADING_PRODUCTS; ?></h4>

<?php  if ($flagAnyOutOfStock) { ?>
<?php    if (STOCK_ALLOW_CHECKOUT == 'true') {  ?>
<div class="messageStackError"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div>
<?php    } else { ?>
<div class="messageStackError"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div>
<?php    } //endif STOCK_ALLOW_CHECKOUT ?>
<?php  } //endif flagAnyOutOfStock ?>


    <table border="0" width="100%" cellspacing="0" cellpadding="5" id="table_info_l">
      <tr class="cartTableHeading">
        <th scope="col" id="ccQuantityHeading" width="60"><?php echo TABLE_HEADING_QUANTITY; ?></th>
        <th scope="col" id="ccProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
<?php
  // If there are tax groups, display the tax columns for price breakdown
  if (sizeof($order->info['tax_groups']) > 1) {
?>
        <th scope="col" id="ccTaxHeading"><?php echo HEADING_TAX; ?></th>
<?php
  }
?>
        <th scope="col" id="ccProductsHeading">Item #</th>
        <th scope="col" id="ccTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
      </tr>
<?php // now loop thru all products to display quantity and price ?>
<?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
      <tr class="<?php echo $order->products[$i]['rowClass']; ?>">
        <td  class="cartQuantity"><?php echo $order->products[$i]['qty']; ?>&nbsp;x</td>
        <td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
          <?php  echo $stock_check[$i]; ?>

<?php // if there are attributes, loop thru them and display one per line
    if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
    echo '<ul class="cartAttribsList">';
      for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
?>
      <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>
<?php
      } // end loop
      echo '</ul>';
    } // endif attribute-info
?>
        </td>

<?php // display tax info if exists ?>
<?php if (sizeof($order->info['tax_groups']) > 1)  { ?>
        <td class="cartTotalDisplay">
        <?php echo zen_display_tax_value($order->products[$i]['tax']); ?>%</td>
<?php    }  // endif tax info display  ?>
        <td class="cartTotalDisplay">&nbsp;<?php echo $order->products[$i]['model']; ?></td>
        <td class="cartTotalDisplay">
          <?php echo $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
          if ($order->products[$i]['onetime_charges'] != 0 ) echo '<br /> ' . $currencies->display_price($order->products[$i]['onetime_charges'], $order->products[$i]['tax'], 1);
?>
        </td>
      </tr>
<?php  }  // end for loopthru all products ?>
    </table>
    <!--<hr />-->
  
<?php
  if ($_SESSION['sendto'] != false) {
?>
  <h4 class="dark_bg margin_t bg_car red"><?php echo HEADING_DELIVERY_ADDRESS; ?></h4>
  <ul class="pad_10px">
<?php //echo '<a href="' . $editShippingButtonLink . '" class="fr">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?>
  <?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?></ul>
  
  <!--<?php
    if ($order->info['shipping_method']) {
?>
  <h4 class="dark_bg margin_t bg_dollar"><?php echo HEADING_SHIPPING_METHOD; ?></h4>
  <ul class="pad_10px"><?php echo $order->info['shipping_method']; ?></ul>
  
  <?php
    }
?>-->
<?php
  }
?>
<br class="clear" />

  <h4 class="dark_bg margin_t bg_doc clear red"><?php echo HEADING_PAYMENT_METHOD; ?></h4> 
  <ul class="pad_10px"><?php echo $GLOBALS[$class]->title; ?></ul>
  
  <?php
  if (is_array($payment_modules->modules)) {
    if ($confirmation = $payment_modules->confirmation()) {
?>
  <div class="pad_10px"><?php echo $confirmation['title']; ?></div>
  <?php
    }
?>
  <div >
  <?php
      for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
?>
  <div class="back"><?php echo $confirmation['fields'][$i]['title']; ?></div>
  <div ><?php echo $confirmation['fields'][$i]['field']; ?></div>
  <?php
     }
?>
    </div>
  <?php
  }
?>
  

<!--<h4 class="dark_bg margin_t bg_doc clear"><?php //echo HEADING_ORDER_COMMENTS; ?></h4>

<div class="pad_10px">
  <div class="fr"><?php //echo  '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
  <?php //echo (empty($order->info['comments']) ? NO_COMMENTS_TEXT : nl2br(zen_output_string_protected($order->info['comments'])) . zen_draw_hidden_field('comments', $order->info['comments'])); ?></div>
<br class="clear" />-->

<hr />

<?php
  if (MODULE_ORDER_TOTAL_INSTALLED) {
    $order_totals = $order_total_modules->process();

?>
<div id="orderTotals"><?php $order_total_modules->output(); ?></div>
<?php
  }

  echo zen_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation" onsubmit="submitonce();"');
  if (is_array($payment_modules->modules)) {
    echo $payment_modules->process_button();
  }
?>
<hr />
<?php if($_SESSION['payment'] != 'paypalwpp'){ ?>
<a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING,'','SSL') ?>"><img src="<?php echo DIR_WS_IMAGES . 'button_back.gif'; ?>" class="hand fl pad_1em" style="margin:5px 0" /></a>
<?php } ?>

<?php //echo TITLE_CONTINUE_CHECKOUT_PROCEDURE  . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?>
  <?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDER, BUTTON_CONFIRM_ORDER_ALT, 'name="btn_submit" id="btn_submit"') ;?>
<br/><br/><br/>
</form>
</div>

</div>
</div>